package com.jvtd.eyl.bean.ui;

import com.jvtd.eyl.bean.binding.ClassBean;
import com.jvtd.eyl.bean.binding.PeriodicalBean;

/**
 * 精选显示实体类
 *
 * 作者:chenlei
 * 时间:2018/11/12 4:34 PM
 */
public class HomeBean {
    public static final int TYPE_CLASS = 1;//分类
    public static final int TYPE_TITLE = 2;//全部期刊/标题
    public static final int TYPE_PERIODICAL = 3;//期刊

    private int mType;
    private ClassBean mClassBean;//分类
    private PeriodicalBean mPeriodicalBean;//期刊

    /**
     * 全部期刊初始化
     */
    public HomeBean() {
        mType = TYPE_TITLE;
    }

    /**
     * 分类初始化
     * @param classBean 分类实体
     */
    public HomeBean(ClassBean classBean) {
        mType = TYPE_CLASS;
        mClassBean = classBean;
    }

    /**
     * 期刊初始化
     * @param periodicalBean 期刊实体
     */
    public HomeBean(PeriodicalBean periodicalBean) {
        mType = TYPE_PERIODICAL;
        mPeriodicalBean = periodicalBean;
    }

    public int getType() {
        return mType;
    }

    public void setType(int type) {
        mType = type;
    }

    public ClassBean getClassBean() {
        return mClassBean;
    }

    public void setClassBean(ClassBean classBean) {
        mClassBean = classBean;
    }

    public PeriodicalBean getPeriodicalBean() {
        return mPeriodicalBean;
    }

    public void setPeriodicalBean(PeriodicalBean periodicalBean) {
        mPeriodicalBean = periodicalBean;
    }

    @Override
    public String toString() {
        return "HomeBean{" +
                "mType=" + mType +
                ", mClassBean=" + mClassBean +
                ", mPeriodicalBean=" + mPeriodicalBean +
                '}';
    }
}
